Conventional image coding devices for coding video divide each picture in video into macroblocks each having 16 pixels×16 pixels, and code the macroblocks. The image coding devices eventually generate a coded scream that is compressed by the video coding. Conventional image decoding devices decode the coded stream on a macroblock-by-macroblock basis to reproduce each picture in the video.
One of such conventional image coding methods is International Telecommunication Union Telecommunication Standardization Sector (ITU-T) H. 264 standard (hereinafter, referred to as “H.264 standard”) (for example, see Non-Patent Reference 1 and Non-Patent Reference 2). As shown in FIG. 53A, an image coding device according to H.264 standard divides a picture into slices, then further divides a slice into macroblocks having 16 pixels×16 pixels, and eventually codes the macroblocks. As shown in FIG. 53B, macroblocks in each slice are coded in raster order from left to right. In addition, as shown in FIG. 53C, each slice is assigned with a start code.
An image decoding device finds such start codes from a coded stream. Thereby, the image decoding device can easily detect the beginning of each slice and start decoding it. It is noted that there is no information reference relationship between the slices. The image decoding device can therefore decode the slices independently from one another.
One of variable length coding methods defined in H.264 standard is context adaptive binary arithmetic coding (CABAC: hereinafter, referred to simply as “arithmetic coding”). FIG. 54 shows a block diagram of an arithmetic coding unit that codes image using the arithmetic coding defined by H.264.
The arithmetic coding unit 100 shown in FIG. 54 initializes, at the beginning of a target slice, a symbol occurrence probability stored in a symbol occurrence probability storage unit 102 in the arithmetic coding unit 100, by using one of predetermined three values. Updating a table of the symbol occurrence probability (probability table), the arithmetic coding unit 100 arithmetic-codes each slice according to an occurrence probability of a code in each syntax of the slice. The arithmetic coding unit 100 updates the probability table to be appropriate for target image. As a result, it is possible to improve coding efficiency.
Non-binary syntax elements are firstly binarized by a binarization unit 101 in the arithmetic coding unit 100. Next, according to information of neighboring macroblock(s) (neighbor information) and binary-valued signal data of a target macroblock, a context control unit 103 in the arithmetic coding unit 100 generates an index to be used to select a symbol occurrence probability from the symbol occurrence probability storage unit 102. Then, based on the index, the context control unit 103 reads an occurrence probability of binary-valued signal from the symbol occurrence probability storage unit 102.
A binary arithmetic encoder 104 in the arithmetic coding unit 100 arithmetic-codes the binary-valued signal using the obtained occurrence probability. The context control unit 103 overwrites the symbol occurrence probability resulting from the arithmetic coding into the symbol occurrence probability storage unit 102. Thereby, the symbol occurrence probability is updated.
The above-described image coding device using arithmetic coding can offer high coding efficiency. However, the image coding device needs to code macroblocks, which have been divided from image, in raster order by keeping updating the probability table. Therefore, the above-described image coding device used to fail parallel image coding. As a result, the conventional image coding device has a difficulty in improving performance, besides a difficulty in improving operation frequency.
In order to address the drawbacks, some conventional image coding devices divide image into slices to perform parallel image coding. In this case, such image coding devices cannot use spatial correlation between the slices. Therefore, coding efficiency is deteriorated. It is also noted in FIG. 53B that a macroblock 13 is spatially far from a macroblock 14. Therefore, a symbol occurrence probability of the macroblock 13 would be significantly different from a symbol occurrence probability of the macroblock 14. Even under the situation, the image coding device codes the macroblocks in raster order. In raster order, the image coding device should code the macroblock 14 based on the symbol occurrence probability of the macroblock 13. As a result, coding efficiency is deteriorated.
Among techniques conceived as image coding methods for the next generation, there is a technique addressing the above problems (see Non-Patent Reference 3). As shown in FIG. 55A, Non-Patent Reference 3 discloses a technique where a picture is divided into slices called “entropy slices”. The entropy slices can be referred to by one another. More specifically, a macroblock in such a slice can refer to a macroblock in another slice beyond a border between the slices.
The use of the entropy slices allows an image coding device to refer to information of a neighboring macroblock beyond a slice border when motion vector coding or intra-picture prediction is performed. Thereby, the image coding device can improve coding efficiency using spatial correlation.
Moreover, if the slices are coded in the order shown in FIG. 55B, processing efficiency is improved. For example, the order in FIG. 55B allows the lowest macroblock 5 in a slice 0 adjacent to a slice 1 to be coded earlier than the situation of using the raster order in FIG. 53B. In other words, the order in FIG. 55B enables the image coding device to refer to the slice 0 earlier to code the slice 1. As a result, processing efficiency in parallel processing is improved.